import { _decorator, Component, Node, PhysicMaterial, Physics2DManifoldType, PhysicsSystem2D, v2, director, PhysicsSystem, Tween, Vec3 } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('Block')
export class Block extends Component {
    public fail(destroyCb: Function) {
        this.scheduleOnce(() => {
            const tw1 = new Tween(this.node);
      

            let x=this.node.position.x;
            let y=this.node.position.y;
            tw1.to(1, { position: new Vec3(x, -500, 0) })
            .start();

            destroyCb();


        }, 2);
    }

  
}

